import os
import json
import numpy as np
from pytracking.evaluation.data import Sequence, BaseDataset, SequenceList
from pytracking.utils.load_text import load_text
from PIL import Image
from pathlib import Path


class LaSOTDataset(BaseDataset):
    """
    LaSOT test set consisting of 280 videos (see Protocol-II in the LaSOT paper)

    Publication:
        LaSOT: A High-quality Benchmark for Large-scale Single Object Tracking
        Heng Fan, Liting Lin, Fan Yang, Peng Chu, Ge Deng, Sijia Yu, Hexin Bai, Yong Xu, Chunyuan Liao and Haibin Ling
        CVPR, 2019
        https://arxiv.org/pdf/1809.07845.pdf

    Download the dataset from https://cis.temple.edu/lasot/download.html
    """
    def __init__(self, vos_mode=False, attribute=None):
        super().__init__()
        self.base_path = self.env_settings.lasot_path
        self.sequence_list = self._get_sequence_list()
        self.clean_list = self.clean_seq_list()
        self.att_dict = None

        if attribute is not None:
            self.sequence_list = self._filter_sequence_list_by_attribute(attribute, self.sequence_list)

        self.vos_mode = vos_mode

        self.mask_path = None
        if self.vos_mode:
            self.mask_path = self.env_settings.lasot_mask_path

    def clean_seq_list(self):
        clean_lst = []
        for i in range(len(self.sequence_list)):
            cls, _ = self.sequence_list[i].split('-')
            clean_lst.append(cls)
        return  clean_lst

    def get_sequence_list(self):
        return SequenceList([self._construct_sequence(s) for s in self.sequence_list])

    def _construct_sequence(self, sequence_name):
        class_name = sequence_name.split('-')[0]
        anno_path = '{}/{}/{}/groundtruth.txt'.format(self.base_path, class_name, sequence_name)

        ground_truth_rect = load_text(str(anno_path), delimiter=',', dtype=np.float64)

        occlusion_label_path = '{}/{}/{}/full_occlusion.txt'.format(self.base_path, class_name, sequence_name)

        # NOTE: pandas backed seems super super slow for loading occlusion/oov masks
        full_occlusion = load_text(str(occlusion_label_path), delimiter=',', dtype=np.float64, backend='numpy')

        out_of_view_label_path = '{}/{}/{}/out_of_view.txt'.format(self.base_path, class_name, sequence_name)
        out_of_view = load_text(str(out_of_view_label_path), delimiter=',', dtype=np.float64, backend='numpy')

        target_visible = np.logical_and(full_occlusion == 0, out_of_view == 0)

        frames_path = '{}/{}/{}/img'.format(self.base_path, class_name, sequence_name)

        frames_list = ['{}/{:08d}.jpg'.format(frames_path, frame_number) for frame_number in range(1, ground_truth_rect.shape[0] + 1)]

        target_class = class_name

        masks = None
        if self.vos_mode:
            seq_mask_path = '{}/{}'.format(self.mask_path, sequence_name)
            masks = [self._load_mask(Path(self._get_anno_frame_path(seq_mask_path, f[-12:-3] + 'png')))
                     for f in frames_list[0:1]]

        return Sequence(sequence_name, frames_list, 'lasot', ground_truth_rect.reshape(-1, 4),
                        object_class=target_class, target_visible=target_visible,
                        ground_truth_seg=masks)

    def get_attribute_names(self, mode='short'):
        if self.att_dict is None:
            self.att_dict = self._load_attributes()

        names = self.att_dict['att_name_short'] if mode == 'short' else self.att_dict['att_name_long']
        return names

    def _load_attributes(self):
        with open(os.path.join(os.path.dirname(os.path.realpath(__file__)),
                               'dataset_attribute_specs', 'LaSOT_attributes.json'), 'r') as f:
            att_dict = json.load(f)
        return att_dict

    def _filter_sequence_list_by_attribute(self, att, seq_list):
        if self.att_dict is None:
            self.att_dict = self._load_attributes()

        if att not in self.att_dict['att_name_short']:
            if att in self.att_dict['att_name_long']:
                att = self.att_dict['att_name_short'][self.att_dict['att_name_long'].index(att)]
            else:
                raise ValueError('\'{}\' attribute invalid.')

        return [s for s in seq_list if att in self.att_dict[s]]

    @staticmethod
    def _load_mask(path):
        if not path.exists():
            print('Error: Could not read: ', path, flush=True)
            return None
        im = np.array(Image.open(path))
        im = np.atleast_3d(im)[..., 0]
        return im

    def _get_anno_frame_path(self, seq_path, frame_name):
        return os.path.join(seq_path, frame_name)  # frames start from 1

    def __len__(self):
        return len(self.sequence_list)

    def _get_sequence_list(self):
        sequence_list = ['airplane-1',
                         'airplane-9',
                         'airplane-13',
                         'airplane-15',
                         'basketball-1',
                         'basketball-6',
                         'basketball-7',
                         'basketball-11',
                         'bear-2',
                         'bear-4',
                         'bear-6',
                         'bear-17',
                         'bicycle-2',
                         'bicycle-7',
                         'bicycle-9',
                         'bicycle-18',
                         'bird-2',
                         'bird-3',
                         'bird-15',
                         'bird-17',
                         'boat-3',
                         'boat-4',
                         'boat-12',
                         'boat-17',
                         'book-3',
                         'book-10',
                         'book-11',
                         'book-19',
                         'bottle-1',
                         'bottle-12',
                         'bottle-14',
                         'bottle-18',
                         'bus-2',
                         'bus-5',
                         'bus-17',
                         'bus-19',
                         'car-2',
                         'car-6',
                         'car-9',
                         'car-17',
                         'cat-1',
                         'cat-3',
                         'cat-18',
                         'cat-20',
                         'cattle-2',
                         'cattle-7',
                         'cattle-12',
                         'cattle-13',
                         'spider-14',
                         'spider-16',
                         'spider-18',
                         'spider-20',
                         'coin-3',
                         'coin-6',
                         'coin-7',
                         'coin-18',
                         'crab-3',
                         'crab-6',
                         'crab-12',
                         'crab-18',
                         'surfboard-12',
                         'surfboard-4',
                         'surfboard-5',
                         'surfboard-8',
                         'cup-1',
                         'cup-4',
                         'cup-7',
                         'cup-17',
                         'deer-4',
                         'deer-8',
                         'deer-10',
                         'deer-14',
                         'dog-1',
                         'dog-7',
                         'dog-15',
                         'dog-19',
                         'guitar-3',
                         'guitar-8',
                         'guitar-10',
                         'guitar-16',
                         'person-1',
                         'person-5',
                         'person-10',
                         'person-12',
                         'pig-2',
                         'pig-10',
                         'pig-13',
                         'pig-18',
                         'rubicCube-1',
                         'rubicCube-6',
                         'rubicCube-14',
                         'rubicCube-19',
                         'swing-10',
                         'swing-14',
                         'swing-17',
                         'swing-20',
                         'drone-13',
                         'drone-15',
                         'drone-2',
                         'drone-7',
                         'pool-12',
                         'pool-15',
                         'pool-3',
                         'pool-7',
                         'rabbit-10',
                         'rabbit-13',
                         'rabbit-17',
                         'rabbit-19',
                         'racing-10',
                         'racing-15',
                         'racing-16',
                         'racing-20',
                         'robot-1',
                         'robot-19',
                         'robot-5',
                         'robot-8',
                         'sepia-13',
                         'sepia-16',
                         'sepia-6',
                         'sepia-8',
                         'sheep-3',
                         'sheep-5',
                         'sheep-7',
                         'sheep-9',
                         'skateboard-16',
                         'skateboard-19',
                         'skateboard-3',
                         'skateboard-8',
                         'tank-14',
                         'tank-16',
                         'tank-6',
                         'tank-9',
                         'tiger-12',
                         'tiger-18',
                         'tiger-4',
                         'tiger-6',
                         'train-1',
                         'train-11',
                         'train-20',
                         'train-7',
                         'truck-16',
                         'truck-3',
                         'truck-6',
                         'truck-7',
                         'turtle-16',
                         'turtle-5',
                         'turtle-8',
                         'turtle-9',
                         'umbrella-17',
                         'umbrella-19',
                         'umbrella-2',
                         'umbrella-9',
                         'yoyo-15',
                         'yoyo-17',
                         'yoyo-19',
                         'yoyo-7',
                         'zebra-10',
                         'zebra-14',
                         'zebra-16',
                         'zebra-17',
                         'elephant-1',
                         'elephant-12',
                         'elephant-16',
                         'elephant-18',
                         'goldfish-3',
                         'goldfish-7',
                         'goldfish-8',
                         'goldfish-10',
                         'hat-1',
                         'hat-2',
                         'hat-5',
                         'hat-18',
                         'kite-4',
                         'kite-6',
                         'kite-10',
                         'kite-15',
                         'motorcycle-1',
                         'motorcycle-3',
                         'motorcycle-9',
                         'motorcycle-18',
                         'mouse-1',
                         'mouse-8',
                         'mouse-9',
                         'mouse-17',
                         'flag-3',
                         'flag-9',
                         'flag-5',
                         'flag-2',
                         'frog-3',
                         'frog-4',
                         'frog-20',
                         'frog-9',
                         'gametarget-1',
                         'gametarget-2',
                         'gametarget-7',
                         'gametarget-13',
                         'hand-2',
                         'hand-3',
                         'hand-9',
                         'hand-16',
                         'helmet-5',
                         'helmet-11',
                         'helmet-19',
                         'helmet-13',
                         'licenseplate-6',
                         'licenseplate-12',
                         'licenseplate-13',
                         'licenseplate-15',
                         'electricfan-1',
                         'electricfan-10',
                         'electricfan-18',
                         'electricfan-20',
                         'chameleon-3',
                         'chameleon-6',
                         'chameleon-11',
                         'chameleon-20',
                         'crocodile-3',
                         'crocodile-4',
                         'crocodile-10',
                         'crocodile-14',
                         'gecko-1',
                         'gecko-5',
                         'gecko-16',
                         'gecko-19',
                         'fox-2',
                         'fox-3',
                         'fox-5',
                         'fox-20',
                         'giraffe-2',
                         'giraffe-10',
                         'giraffe-13',
                         'giraffe-15',
                         'gorilla-4',
                         'gorilla-6',
                         'gorilla-9',
                         'gorilla-13',
                         'hippo-1',
                         'hippo-7',
                         'hippo-9',
                         'hippo-20',
                         'horse-1',
                         'horse-4',
                         'horse-12',
                         'horse-15',
                         'kangaroo-2',
                         'kangaroo-5',
                         'kangaroo-11',
                         'kangaroo-14',
                         'leopard-1',
                         'leopard-7',
                         'leopard-16',
                         'leopard-20',
                         'lion-1',
                         'lion-5',
                         'lion-12',
                         'lion-20',
                         'lizard-1',
                         'lizard-3',
                         'lizard-6',
                         'lizard-13',
                         'microphone-2',
                         'microphone-6',
                         'microphone-14',
                         'microphone-16',
                         'monkey-3',
                         'monkey-4',
                         'monkey-9',
                         'monkey-17',
                         'shark-2',
                         'shark-3',
                         'shark-5',
                         'shark-6',
                         'squirrel-8',
                         'squirrel-11',
                         'squirrel-13',
                         'squirrel-19',
                         'volleyball-1',
                         'volleyball-13',
                         'volleyball-18',
                         'volleyball-19']
        return sequence_list


class LaSOTTrainSequencesDataset(LaSOTDataset):
    def __init__(self):
        super().__init__()

    def _get_sequence_list(self):
        sequence_list = [
            "airplane-10",
            "airplane-11",
            "airplane-12",
            "airplane-14",
            "airplane-16",
            "airplane-17",
            "airplane-18",
            "airplane-19",
            "airplane-2",
            "airplane-20",
            "airplane-3",
            "airplane-4",
            "airplane-5",
            "airplane-6",
            "airplane-7",
            "airplane-8",
            "basketball-10",
            "basketball-12",
            "basketball-13",
            "basketball-14",
            "basketball-15",
            "basketball-16",
            "basketball-17",
            "basketball-18",
            "basketball-19",
            "basketball-2",
            "basketball-20",
            "basketball-3",
            "basketball-4",
            "basketball-5",
            "basketball-8",
            "basketball-9",
            "bear-1",
            "bear-10",
            "bear-11",
            "bear-12",
            "bear-13",
            "bear-14",
            "bear-15",
            "bear-16",
            "bear-18",
            "bear-19",
            "bear-20",
            "bear-3",
            "bear-5",
            "bear-7",
            "bear-8",
            "bear-9",
            "bicycle-1",
            "bicycle-10",
            "bicycle-11",
            "bicycle-12",
            "bicycle-13",
            "bicycle-14",
            "bicycle-15",
            "bicycle-16",
            "bicycle-17",
            "bicycle-19",
            "bicycle-20",
            "bicycle-3",
            "bicycle-4",
            "bicycle-5",
            "bicycle-6",
            "bicycle-8",
            "bird-1",
            "bird-10",
            "bird-11",
            "bird-12",
            "bird-13",
            "bird-14",
            "bird-16",
            "bird-18",
            "bird-19",
            "bird-20",
            "bird-4",
            "bird-5",
            "bird-6",
            "bird-7",
            "bird-8",
            "bird-9",
            "boat-1",
            "boat-10",
            "boat-11",
            "boat-13",
            "boat-14",
            "boat-15",
            "boat-16",
            "boat-18",
            "boat-19",
            "boat-2",
            "boat-20",
            "boat-5",
            "boat-6",
            "boat-7",
            "boat-8",
            "boat-9",
            "book-1",
            "book-12",
            "book-13",
            "book-14",
            "book-15",
            "book-16",
            "book-17",
            "book-18",
            "book-2",
            "book-20",
            "book-4",
            "book-5",
            "book-6",
            "book-7",
            "book-8",
            "book-9",
            "bottle-10",
            "bottle-11",
            "bottle-13",
            "bottle-15",
            "bottle-16",
            "bottle-17",
            "bottle-19",
            "bottle-2",
            "bottle-20",
            "bottle-3",
            "bottle-4",
            "bottle-5",
            "bottle-6",
            "bottle-7",
            "bottle-8",
            "bottle-9",
            "bus-1",
            "bus-10",
            "bus-11",
            "bus-12",
            "bus-13",
            "bus-14",
            "bus-15",
            "bus-16",
            "bus-18",
            "bus-20",
            "bus-3",
            "bus-4",
            "bus-6",
            "bus-7",
            "bus-8",
            "bus-9",
            "car-1",
            "car-10",
            "car-11",
            "car-12",
            "car-13",
            "car-14",
            "car-15",
            "car-16",
            "car-18",
            "car-19",
            "car-20",
            "car-3",
            "car-4",
            "car-5",
            "car-7",
            "car-8",
            "cat-10",
            "cat-11",
            "cat-12",
            "cat-13",
            "cat-14",
            "cat-15",
            "cat-16",
            "cat-17",
            "cat-19",
            "cat-2",
            "cat-4",
            "cat-5",
            "cat-6",
            "cat-7",
            "cat-8",
            "cat-9",
            "cattle-1",
            "cattle-10",
            "cattle-11",
            "cattle-14",
            "cattle-15",
            "cattle-16",
            "cattle-17",
            "cattle-18",
            "cattle-19",
            "cattle-20",
            "cattle-3",
            "cattle-4",
            "cattle-5",
            "cattle-6",
            "cattle-8",
            "cattle-9",
            "chameleon-1",
            "chameleon-10",
            "chameleon-12",
            "chameleon-13",
            "chameleon-14",
            "chameleon-15",
            "chameleon-16",
            "chameleon-17",
            "chameleon-18",
            "chameleon-19",
            "chameleon-2",
            "chameleon-4",
            "chameleon-5",
            "chameleon-7",
            "chameleon-8",
            "chameleon-9",
            "coin-1",
            "coin-10",
            "coin-11",
            "coin-12",
            "coin-13",
            "coin-14",
            "coin-15",
            "coin-16",
            "coin-17",
            "coin-19",
            "coin-2",
            "coin-20",
            "coin-4",
            "coin-5",
            "coin-8",
            "coin-9",
            "crab-1",
            "crab-10",
            "crab-11",
            "crab-13",
            "crab-14",
            "crab-15",
            "crab-16",
            "crab-17",
            "crab-19",
            "crab-2",
            "crab-20",
            "crab-4",
            "crab-5",
            "crab-7",
            "crab-8",
            "crab-9",
            "crocodile-1",
            "crocodile-11",
            "crocodile-12",
            "crocodile-13",
            "crocodile-15",
            "crocodile-16",
            "crocodile-17",
            "crocodile-18",
            "crocodile-19",
            "crocodile-2",
            "crocodile-20",
            "crocodile-5",
            "crocodile-6",
            "crocodile-7",
            "crocodile-8",
            "crocodile-9",
            "cup-10",
            "cup-11",
            "cup-12",
            "cup-13",
            "cup-14",
            "cup-15",
            "cup-16",
            "cup-18",
            "cup-19",
            "cup-2",
            "cup-20",
            "cup-3",
            "cup-5",
            "cup-6",
            "cup-8",
            "cup-9",
            "deer-1",
            "deer-11",
            "deer-12",
            "deer-13",
            "deer-15",
            "deer-16",
            "deer-17",
            "deer-18",
            "deer-19",
            "deer-2",
            "deer-20",
            "deer-3",
            "deer-5",
            "deer-6",
            "deer-7",
            "deer-9",
            "dog-10",
            "dog-11",
            "dog-12",
            "dog-13",
            "dog-14",
            "dog-16",
            "dog-17",
            "dog-18",
            "dog-2",
            "dog-20",
            "dog-3",
            "dog-4",
            "dog-5",
            "dog-6",
            "dog-8",
            "dog-9",
            "drone-1",
            "drone-10",
            "drone-11",
            "drone-12",
            "drone-14",
            "drone-16",
            "drone-17",
            "drone-18",
            "drone-19",
            "drone-20",
            "drone-3",
            "drone-4",
            "drone-5",
            "drone-6",
            "drone-8",
            "drone-9",
            "electricfan-11",
            "electricfan-12",
            "electricfan-13",
            "electricfan-14",
            "electricfan-15",
            "electricfan-16",
            "electricfan-17",
            "electricfan-19",
            "electricfan-2",
            "electricfan-3",
            "electricfan-4",
            "electricfan-5",
            "electricfan-6",
            "electricfan-7",
            "electricfan-8",
            "electricfan-9",
            "elephant-10",
            "elephant-11",
            "elephant-13",
            "elephant-14",
            "elephant-15",
            "elephant-17",
            "elephant-19",
            "elephant-2",
            "elephant-20",
            "elephant-3",
            "elephant-4",
            "elephant-5",
            "elephant-6",
            "elephant-7",
            "elephant-8",
            "elephant-9",
            "flag-1",
            "flag-10",
            "flag-11",
            "flag-12",
            "flag-13",
            "flag-14",
            "flag-15",
            "flag-16",
            "flag-17",
            "flag-18",
            "flag-19",
            "flag-20",
            "flag-4",
            "flag-6",
            "flag-7",
            "flag-8",
            "fox-1",
            "fox-10",
            "fox-11",
            "fox-12",
            "fox-13",
            "fox-14",
            "fox-15",
            "fox-16",
            "fox-17",
            "fox-18",
            "fox-19",
            "fox-4",
            "fox-6",
            "fox-7",
            "fox-8",
            "fox-9",
            "frog-1",
            "frog-10",
            "frog-11",
            "frog-12",
            "frog-13",
            "frog-14",
            "frog-15",
            "frog-16",
            "frog-17",
            "frog-18",
            "frog-19",
            "frog-2",
            "frog-5",
            "frog-6",
            "frog-7",
            "frog-8",
            "gametarget-10",
            "gametarget-11",
            "gametarget-12",
            "gametarget-14",
            "gametarget-15",
            "gametarget-16",
            "gametarget-17",
            "gametarget-18",
            "gametarget-19",
            "gametarget-20",
            "gametarget-3",
            "gametarget-4",
            "gametarget-5",
            "gametarget-6",
            "gametarget-8",
            "gametarget-9",
            "gecko-10",
            "gecko-11",
            "gecko-12",
            "gecko-13",
            "gecko-14",
            "gecko-15",
            "gecko-17",
            "gecko-18",
            "gecko-2",
            "gecko-20",
            "gecko-3",
            "gecko-4",
            "gecko-6",
            "gecko-7",
            "gecko-8",
            "gecko-9",
            "giraffe-1",
            "giraffe-11",
            "giraffe-12",
            "giraffe-14",
            "giraffe-16",
            "giraffe-17",
            "giraffe-18",
            "giraffe-19",
            "giraffe-20",
            "giraffe-3",
            "giraffe-4",
            "giraffe-5",
            "giraffe-6",
            "giraffe-7",
            "giraffe-8",
            "giraffe-9",
            "goldfish-1",
            "goldfish-11",
            "goldfish-12",
            "goldfish-13",
            "goldfish-14",
            "goldfish-15",
            "goldfish-16",
            "goldfish-17",
            "goldfish-18",
            "goldfish-19",
            "goldfish-2",
            "goldfish-20",
            "goldfish-4",
            "goldfish-5",
            "goldfish-6",
            "goldfish-9",
            "gorilla-1",
            "gorilla-10",
            "gorilla-11",
            "gorilla-12",
            "gorilla-14",
            "gorilla-15",
            "gorilla-16",
            "gorilla-17",
            "gorilla-18",
            "gorilla-19",
            "gorilla-2",
            "gorilla-20",
            "gorilla-3",
            "gorilla-5",
            "gorilla-7",
            "gorilla-8",
            "guitar-1",
            "guitar-11",
            "guitar-12",
            "guitar-13",
            "guitar-14",
            "guitar-15",
            "guitar-17",
            "guitar-18",
            "guitar-19",
            "guitar-2",
            "guitar-20",
            "guitar-4",
            "guitar-5",
            "guitar-6",
            "guitar-7",
            "guitar-9",
            "hand-1",
            "hand-10",
            "hand-11",
            "hand-12",
            "hand-13",
            "hand-14",
            "hand-15",
            "hand-17",
            "hand-18",
            "hand-19",
            "hand-20",
            "hand-4",
            "hand-5",
            "hand-6",
            "hand-7",
            "hand-8",
            "hat-10",
            "hat-11",
            "hat-12",
            "hat-13",
            "hat-14",
            "hat-15",
            "hat-16",
            "hat-17",
            "hat-19",
            "hat-20",
            "hat-3",
            "hat-4",
            "hat-6",
            "hat-7",
            "hat-8",
            "hat-9",
            "helmet-1",
            "helmet-10",
            "helmet-12",
            "helmet-14",
            "helmet-15",
            "helmet-16",
            "helmet-17",
            "helmet-18",
            "helmet-2",
            "helmet-20",
            "helmet-3",
            "helmet-4",
            "helmet-6",
            "helmet-7",
            "helmet-8",
            "helmet-9",
            "hippo-10",
            "hippo-11",
            "hippo-12",
            "hippo-13",
            "hippo-14",
            "hippo-15",
            "hippo-16",
            "hippo-17",
            "hippo-18",
            "hippo-19",
            "hippo-2",
            "hippo-3",
            "hippo-4",
            "hippo-5",
            "hippo-6",
            "hippo-8",
            "horse-10",
            "horse-11",
            "horse-13",
            "horse-14",
            "horse-16",
            "horse-17",
            "horse-18",
            "horse-19",
            "horse-2",
            "horse-20",
            "horse-3",
            "horse-5",
            "horse-6",
            "horse-7",
            "horse-8",
            "horse-9",
            "kangaroo-1",
            "kangaroo-10",
            "kangaroo-12",
            "kangaroo-13",
            "kangaroo-15",
            "kangaroo-16",
            "kangaroo-17",
            "kangaroo-18",
            "kangaroo-19",
            "kangaroo-20",
            "kangaroo-3",
            "kangaroo-4",
            "kangaroo-6",
            "kangaroo-7",
            "kangaroo-8",
            "kangaroo-9",
            "kite-1",
            "kite-11",
            "kite-12",
            "kite-13",
            "kite-14",
            "kite-16",
            "kite-17",
            "kite-18",
            "kite-19",
            "kite-2",
            "kite-20",
            "kite-3",
            "kite-5",
            "kite-7",
            "kite-8",
            "kite-9",
            "leopard-10",
            "leopard-11",
            "leopard-12",
            "leopard-13",
            "leopard-14",
            "leopard-15",
            "leopard-17",
            "leopard-18",
            "leopard-19",
            "leopard-2",
            "leopard-3",
            "leopard-4",
            "leopard-5",
            "leopard-6",
            "leopard-8",
            "leopard-9",
            "licenseplate-1",
            "licenseplate-10",
            "licenseplate-11",
            "licenseplate-14",
            "licenseplate-16",
            "licenseplate-17",
            "licenseplate-18",
            "licenseplate-19",
            "licenseplate-2",
            "licenseplate-20",
            "licenseplate-3",
            "licenseplate-4",
            "licenseplate-5",
            "licenseplate-7",
            "licenseplate-8",
            "licenseplate-9",
            "lion-10",
            "lion-11",
            "lion-13",
            "lion-14",
            "lion-15",
            "lion-16",
            "lion-17",
            "lion-18",
            "lion-19",
            "lion-2",
            "lion-3",
            "lion-4",
            "lion-6",
            "lion-7",
            "lion-8",
            "lion-9",
            "lizard-10",
            "lizard-11",
            "lizard-12",
            "lizard-14",
            "lizard-15",
            "lizard-16",
            "lizard-17",
            "lizard-18",
            "lizard-19",
            "lizard-2",
            "lizard-20",
            "lizard-4",
            "lizard-5",
            "lizard-7",
            "lizard-8",
            "lizard-9",
            "microphone-1",
            "microphone-10",
            "microphone-11",
            "microphone-12",
            "microphone-13",
            "microphone-15",
            "microphone-17",
            "microphone-18",
            "microphone-19",
            "microphone-20",
            "microphone-3",
            "microphone-4",
            "microphone-5",
            "microphone-7",
            "microphone-8",
            "microphone-9",
            "monkey-1",
            "monkey-10",
            "monkey-11",
            "monkey-12",
            "monkey-13",
            "monkey-14",
            "monkey-15",
            "monkey-16",
            "monkey-18",
            "monkey-19",
            "monkey-2",
            "monkey-20",
            "monkey-5",
            "monkey-6",
            "monkey-7",
            "monkey-8",
            "motorcycle-10",
            "motorcycle-11",
            "motorcycle-12",
            "motorcycle-13",
            "motorcycle-14",
            "motorcycle-15",
            "motorcycle-16",
            "motorcycle-17",
            "motorcycle-19",
            "motorcycle-2",
            "motorcycle-20",
            "motorcycle-4",
            "motorcycle-5",
            "motorcycle-6",
            "motorcycle-7",
            "motorcycle-8",
            "mouse-10",
            "mouse-11",
            "mouse-12",
            "mouse-13",
            "mouse-14",
            "mouse-15",
            "mouse-16",
            "mouse-18",
            "mouse-19",
            "mouse-2",
            "mouse-20",
            "mouse-3",
            "mouse-4",
            "mouse-5",
            "mouse-6",
            "mouse-7",
            "person-11",
            "person-13",
            "person-14",
            "person-15",
            "person-16",
            "person-17",
            "person-18",
            "person-19",
            "person-2",
            "person-20",
            "person-3",
            "person-4",
            "person-6",
            "person-7",
            "person-8",
            "person-9",
            "pig-1",
            "pig-11",
            "pig-12",
            "pig-14",
            "pig-15",
            "pig-16",
            "pig-17",
            "pig-19",
            "pig-20",
            "pig-3",
            "pig-4",
            "pig-5",
            "pig-6",
            "pig-7",
            "pig-8",
            "pig-9",
            "pool-1",
            "pool-10",
            "pool-11",
            "pool-13",
            "pool-14",
            "pool-16",
            "pool-17",
            "pool-18",
            "pool-19",
            "pool-2",
            "pool-20",
            "pool-4",
            "pool-5",
            "pool-6",
            "pool-8",
            "pool-9",
            "rabbit-1",
            "rabbit-11",
            "rabbit-12",
            "rabbit-14",
            "rabbit-15",
            "rabbit-16",
            "rabbit-18",
            "rabbit-2",
            "rabbit-20",
            "rabbit-3",
            "rabbit-4",
            "rabbit-5",
            "rabbit-6",
            "rabbit-7",
            "rabbit-8",
            "rabbit-9",
            "racing-1",
            "racing-11",
            "racing-12",
            "racing-13",
            "racing-14",
            "racing-17",
            "racing-18",
            "racing-19",
            "racing-2",
            "racing-3",
            "racing-4",
            "racing-5",
            "racing-6",
            "racing-7",
            "racing-8",
            "racing-9",
            "robot-10",
            "robot-11",
            "robot-12",
            "robot-13",
            "robot-14",
            "robot-15",
            "robot-16",
            "robot-17",
            "robot-18",
            "robot-2",
            "robot-20",
            "robot-3",
            "robot-4",
            "robot-6",
            "robot-7",
            "robot-9",
            "rubicCube-10",
            "rubicCube-11",
            "rubicCube-12",
            "rubicCube-13",
            "rubicCube-15",
            "rubicCube-16",
            "rubicCube-17",
            "rubicCube-18",
            "rubicCube-2",
            "rubicCube-20",
            "rubicCube-3",
            "rubicCube-4",
            "rubicCube-5",
            "rubicCube-7",
            "rubicCube-8",
            "rubicCube-9",
            "sepia-1",
            "sepia-10",
            "sepia-11",
            "sepia-12",
            "sepia-14",
            "sepia-15",
            "sepia-17",
            "sepia-18",
            "sepia-19",
            "sepia-2",
            "sepia-20",
            "sepia-3",
            "sepia-4",
            "sepia-5",
            "sepia-7",
            "sepia-9",
            "shark-1",
            "shark-10",
            "shark-11",
            "shark-12",
            "shark-13",
            "shark-14",
            "shark-15",
            "shark-16",
            "shark-17",
            "shark-18",
            "shark-19",
            "shark-20",
            "shark-4",
            "shark-7",
            "shark-8",
            "shark-9",
            "sheep-1",
            "sheep-10",
            "sheep-11",
            "sheep-12",
            "sheep-13",
            "sheep-14",
            "sheep-15",
            "sheep-16",
            "sheep-17",
            "sheep-18",
            "sheep-19",
            "sheep-2",
            "sheep-20",
            "sheep-4",
            "sheep-6",
            "sheep-8",
            "skateboard-1",
            "skateboard-10",
            "skateboard-11",
            "skateboard-12",
            "skateboard-13",
            "skateboard-14",
            "skateboard-15",
            "skateboard-17",
            "skateboard-18",
            "skateboard-2",
            "skateboard-20",
            "skateboard-4",
            "skateboard-5",
            "skateboard-6",
            "skateboard-7",
            "skateboard-9",
            "spider-1",
            "spider-10",
            "spider-11",
            "spider-12",
            "spider-13",
            "spider-15",
            "spider-17",
            "spider-19",
            "spider-2",
            "spider-3",
            "spider-4",
            "spider-5",
            "spider-6",
            "spider-7",
            "spider-8",
            "spider-9",
            "squirrel-1",
            "squirrel-10",
            "squirrel-12",
            "squirrel-14",
            "squirrel-15",
            "squirrel-16",
            "squirrel-17",
            "squirrel-18",
            "squirrel-2",
            "squirrel-20",
            "squirrel-3",
            "squirrel-4",
            "squirrel-5",
            "squirrel-6",
            "squirrel-7",
            "squirrel-9",
            "surfboard-1",
            "surfboard-10",
            "surfboard-11",
            "surfboard-13",
            "surfboard-14",
            "surfboard-15",
            "surfboard-16",
            "surfboard-17",
            "surfboard-18",
            "surfboard-19",
            "surfboard-2",
            "surfboard-20",
            "surfboard-3",
            "surfboard-6",
            "surfboard-7",
            "surfboard-9",
            "swing-1",
            "swing-11",
            "swing-12",
            "swing-13",
            "swing-15",
            "swing-16",
            "swing-18",
            "swing-19",
            "swing-2",
            "swing-3",
            "swing-4",
            "swing-5",
            "swing-6",
            "swing-7",
            "swing-8",
            "swing-9",
            "tank-1",
            "tank-10",
            "tank-11",
            "tank-12",
            "tank-13",
            "tank-15",
            "tank-17",
            "tank-18",
            "tank-19",
            "tank-2",
            "tank-20",
            "tank-3",
            "tank-4",
            "tank-5",
            "tank-7",
            "tank-8",
            "tiger-1",
            "tiger-10",
            "tiger-11",
            "tiger-13",
            "tiger-14",
            "tiger-15",
            "tiger-16",
            "tiger-17",
            "tiger-19",
            "tiger-2",
            "tiger-20",
            "tiger-3",
            "tiger-5",
            "tiger-7",
            "tiger-8",
            "tiger-9",
            "train-10",
            "train-12",
            "train-13",
            "train-14",
            "train-15",
            "train-16",
            "train-17",
            "train-18",
            "train-19",
            "train-2",
            "train-3",
            "train-4",
            "train-5",
            "train-6",
            "train-8",
            "train-9",
            "truck-1",
            "truck-10",
            "truck-11",
            "truck-12",
            "truck-13",
            "truck-14",
            "truck-15",
            "truck-17",
            "truck-18",
            "truck-19",
            "truck-2",
            "truck-20",
            "truck-4",
            "truck-5",
            "truck-8",
            "truck-9",
            "turtle-1",
            "turtle-10",
            "turtle-11",
            "turtle-12",
            "turtle-13",
            "turtle-14",
            "turtle-15",
            "turtle-17",
            "turtle-18",
            "turtle-19",
            "turtle-2",
            "turtle-20",
            "turtle-3",
            "turtle-4",
            "turtle-6",
            "turtle-7",
            "umbrella-1",
            "umbrella-10",
            "umbrella-11",
            "umbrella-12",
            "umbrella-13",
            "umbrella-14",
            "umbrella-15",
            "umbrella-16",
            "umbrella-18",
            "umbrella-20",
            "umbrella-3",
            "umbrella-4",
            "umbrella-5",
            "umbrella-6",
            "umbrella-7",
            "umbrella-8",
            "volleyball-10",
            "volleyball-11",
            "volleyball-12",
            "volleyball-14",
            "volleyball-15",
            "volleyball-16",
            "volleyball-17",
            "volleyball-2",
            "volleyball-20",
            "volleyball-3",
            "volleyball-4",
            "volleyball-5",
            "volleyball-6",
            "volleyball-7",
            "volleyball-8",
            "volleyball-9",
            "yoyo-1",
            "yoyo-10",
            "yoyo-11",
            "yoyo-12",
            "yoyo-13",
            "yoyo-14",
            "yoyo-16",
            "yoyo-18",
            "yoyo-2",
            "yoyo-20",
            "yoyo-3",
            "yoyo-4",
            "yoyo-5",
            "yoyo-6",
            "yoyo-8",
            "yoyo-9",
            "zebra-1",
            "zebra-11",
            "zebra-12",
            "zebra-13",
            "zebra-15",
            "zebra-18",
            "zebra-19",
            "zebra-2",
            "zebra-20",
            "zebra-3",
            "zebra-4",
            "zebra-5",
            "zebra-6",
            "zebra-7",
            "zebra-8",
            "zebra-9"
        ]

        return sequence_list
